import { withRouter } from 'react-router-dom';
import { Card, Button } from 'antd';
import AuthButton from '@/components/authButton'

import less from './index.less';

class MessageList extends React.Component {
  state = {}

  formList = []

  componentWillMount() {
    console.log('即将挂载')
    console.log(this.props);
  }

  componentDidMount() {

  }

  componentWillUnmount() {
    console.log('生命结束即将挂载')
  }

  handleToAdd = () => {
    this.props.history.push('/message/messageAdd');
  }

  render() {
    return (
      <Card>
        <AuthButton authName="add" onClick={this.handleToAdd}>新增</AuthButton>
        <span className={less.blue}>111111</span>
      </Card>
    )
  }
}
export default MessageList